package com.baidu.day01;
//键盘输入语句
//1、引入java.util包下的Scanner类
import java.util.Scanner;

public class Demo05 {
    public static void main(String[] args) {
        //2、创建一个Scanner对象，接收键盘输入
        Scanner myScanner = new Scanner(System.in);
        //3、提示信息，接收用户输入类型
        System.out.println("请输入一个整数：");
        int num = myScanner.nextInt();
        System.out.println("您输入的整数是：" + num);
        //接收字符串 String name = myScanner.next();
        //接收小数 double money = myScanner.nextDouble();
        //接收布尔值 boolean flag = myScanner.nextBoolean();
        //接收字符 char ch = myScanner.next().charAt(0);
    }
}
